1. Technical Field
The present invention relates generally to the field of computer systems and, more specifically, to a method, system, and computer program product for creating and managing memory affinity in logically partitioned data processing systems.
2. Description of Related Art
A logical partitioning option (LPAR) within a data processing system (platform) allows multiple copies of a single operating system (OS) or multiple heterogeneous operating systems to be simultaneously run on a single data processing system platform. A partition, within which an operating system image runs, is assigned a non-overlapping subset of the platform's resources. These platform allocable resources include one or more architecturally distinct processors with their interrupt management area, regions of system memory, and input/output (I/O) adapter bus slots. The partition's resources are represented by its own open firmware device tree to the OS image.
Each distinct OS or image of an OS running within the platform is protected from each other such that software errors on one logical partition can not affect the correct operation of any of the other partitions. This is provided by allocating a disjoint set of platform resources to be directly managed by each OS image and by providing mechanisms for ensuring that the various images can not control any resources that have not been allocated to it. Furthermore, software errors in the control of an OS's allocated resources are prevented from affecting the resources of any other image. Thus, each image of the OS (or each different OS) directly controls a distinct set of allocable resources within the platform.
Affinity is the proximity connection between the memory sub-system and the processors. Memory affinity effects the latency between system memory and processors. System memory latency may be different depending upon which processor is accessing the memory. Thus, for a particular region of memory, the latency when a first processor is accessing the region may be small, while the latency for that same region may be large when a second processor is accessing the region. The latency may also vary depending upon which region of memory is being accessed. The latency when a first region of system memory is accessed by a particular processor may be small while the latency is large when that particular processor is accessing a second region of system memory.
Therefore, a need exists for a method, system, and computer program product for creating and managing memory affinity in a logically partitioned data processing system such that regions of system memory are allocated to a particular logical partition where the allocated regions of system memory have a close affinity to the processors that are assigned to that particular logical partition.